package com.atguigu.decorator;

/**
 * @author LYJ
 * @Description
 * @date 2021 年 10 月 11 日 下午3:48
 */
public class Decorator extends Drink {
    private Drink drink;

    public Decorator(Drink drink) {
        this.drink = drink;
    }

    @Override
    public float cost() {
        return super.getPrice() + drink.cost();
    }
}
